package exception;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class AutoCloseableDemo {
    public static void main(String[] args) throws FileNotFoundException {
        try {
            FileOutputStream fos = new FileOutputStream("fos.dat");
            {
                fos.write(1);
            }
        } catch (IOException e) {
            System.out.println("出错了");
            ;

        }
    }
}